﻿using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class CostCenterDTO : INotifyPropertyChanged
    {
        private String _CostCenterId;
        private String _Description;
        private int _No;

        [DataMember]
        public String CostCenterId
        {
            get { return _CostCenterId; }
            set
            {
                _CostCenterId = value;
                RaisePropertyChanged("CostCenterId");
            }
        }

        [DataMember]
        public String Description
        {
            get { return _Description; }
            set
            {
                _Description = value;
                RaisePropertyChanged("Description");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}